package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EmployeeServiceSettingsMapper;
import com.ruoyi.system.domain.EmployeeServiceSettings;
import com.ruoyi.system.service.IEmployeeServiceSettingsService;

/**
 * 员工服务项设置，用于配置不同服务项的预订规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class EmployeeServiceSettingsServiceImpl implements IEmployeeServiceSettingsService
{
    @Autowired
    private EmployeeServiceSettingsMapper employeeServiceSettingsMapper;

    /**
     * 通过id查询员工服务项设置
     *
     * @param id 员工服务项设置，用于配置不同服务项的预订规则主键
     * @return 员工服务项设置，用于配置不同服务项的预订规则
     */
    @Override
    public EmployeeServiceSettings selectEmployeeServiceSettingsById(Long id)
    {
        return employeeServiceSettingsMapper.selectEmployeeServiceSettingsById(id);
    }

    /**
     * 查询员工服务项设置列表
     *
     * @param employeeServiceSettings 员工服务项设置，用于配置不同服务项的预订规则
     * @return 员工服务项设置，用于配置不同服务项的预订规则
     */
    @Override
    public List<EmployeeServiceSettings> selectEmployeeServiceSettingsList(EmployeeServiceSettings employeeServiceSettings)
    {
        return employeeServiceSettingsMapper.selectEmployeeServiceSettingsList(employeeServiceSettings);
    }

    /**
     * 新增员工服务项设置
     *
     * @param employeeServiceSettings 员工服务项设置，用于配置不同服务项的预订规则
     * @return 结果
     */
    @Override
    public int insertEmployeeServiceSettings(EmployeeServiceSettings employeeServiceSettings)
    {
        return employeeServiceSettingsMapper.insertEmployeeServiceSettings(employeeServiceSettings);
    }

    /**
     * 修改员工服务项设置
     *
     * @param employeeServiceSettings 员工服务项设置，用于配置不同服务项的预订规则
     * @return 结果
     */
    @Override
    public int updateEmployeeServiceSettings(EmployeeServiceSettings employeeServiceSettings)
    {
        return employeeServiceSettingsMapper.updateEmployeeServiceSettings(employeeServiceSettings);
    }

    /**
     * 批量删除员工服务项设置信息
     *
     * @param ids 需要删除的员工服务项设置，用于配置不同服务项的预订规则主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeServiceSettingsByIds(Long[] ids)
    {
        return employeeServiceSettingsMapper.deleteEmployeeServiceSettingsByIds(ids);
    }

    /**
     * 删除员工服务项设置信息
     *
     * @param id 员工服务项设置，用于配置不同服务项的预订规则主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeServiceSettingsById(Long id)
    {
        return employeeServiceSettingsMapper.deleteEmployeeServiceSettingsById(id);
    }

    /**
     * 通过门店ID查询员工服务项设置
     *
     * @param storeId 门店ID
     * @return 员工服务项设置，用于配置不同服务项的预订规则
     */
    @Override
    public EmployeeServiceSettings selectByStoreId(Long storeId)
    {
        return employeeServiceSettingsMapper.selectByStoreId(storeId);
    }
}
